package cc.forgemod.customicon.common.command;

import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.text.TextComponentString;

public abstract class CommandBridge extends CommandBase {

    @Override
    public final void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
        execute(sender, args);
    }

    public static void msg(ICommandSender pSender, String pMsg) {
        if (pSender == null) System.out.println(pMsg);

        pSender.sendMessage(new TextComponentString(pMsg));
    }

    public abstract void execute(ICommandSender sender, String[] args) throws CommandException;

}
